<?php
class indexAction extends frontAction{
	public function execute(){
		$cateID = $this->getGetParam("cateID",0);
		$newsDao = new DaoNews();
		$where = "1";
        if($cateID == 29 || $cateID == 33){
            $cate = service_category::getOne($cateID);
            $this->assign("cate",$cate);
            $where = "categoryID = ".$cateID;
            list($newsList,$page) = $newsDao->getListPage(" $where order by updateTime ",1);
        }else if($cateID == 30 ){
            $cate = service_category::getOne($cateID);
            $this->assign("cate",$cate);
            $where = "categoryID = ".$cateID;
            list($newsList,$page) = $newsDao->getListPage(" $where order by updateTime ",2);
        }else if($cateID == 31 || $cateID == 32){
            $cate = service_category::getOne($cateID);
            $this->assign("cate",$cate);
            $where = "categoryID = ".$cateID;
            list($newsList,$page) = $newsDao->getListPage(" $where order by id ASC ",2);
        }else{
            $cate = service_category::getOne($cateID);
            $this->assign("cate",$cate);
            $where = "categoryID = ".$cateID;
            list($newsList,$page) = $newsDao->getListPage(" $where order by isIndex desc,updateTime desc",20);
        }
		$currentID = service_menu::getCurrent(service_type::NEWS,$cateID);
		$cache = new Cache_request();
		$cache->set("currentID",$currentID);
		$this->assign("newsList",$newsList);
        $this->assign("page",$page);
		$this->assign("currentMenuID",$currentID);
		if($cateID==24){
			$this->display('join');
		}
        if($cateID == 29){
            $this->display('service');
        }
        if($cateID == 30 || $cateID == 31 || $cateID == 32){
            $this->display('manager');
        }
        if($cateID == 33){
            $this->display('deve');
        }
	}
}
?>
